<?
global $db;
$e = $db->query1("select * from node where id = ".$db->sqlint($params["id"]));
skin_param("page",$e);
echo "<div>{$e["content"]}</div>";

echo "<p>projects | <a href='releases.php'>recent releases</a></p>";

$r = $db->query("select * from project ".
	" where node_id = ".$db->sqlint($params["id"]). 
	" order by title ".
	""); 

inc_inclib("image.php");
global $topdir,$topurl;

echo "<table>";
foreach ($r as $e) {
	echo "<tr>";
	echo "<td valign=top align=center>";
	
	echo "<a href=\"{$e["id"]}/\">";
	$fname = "$topdir/shots/{$e["image"]}";
	if ($e["image"] != "" && file_exists($fname)) {
	$img = image_thumb($fname,124,93,"jpg",50);
	list($iw,$ih) = getimagesize("$topdir/thumb/$img");
	echo "<img src='$topurl/thumb/$img' width=$iw height=$ih>";
	} else echo "<img src='$topurl/content/noimage.gif' width=124 height=93>";
	echo "</a>";
	
	echo "<td valign=top>";
	
	echo "<a href=\"{$e["id"]}/\">{$e["title"]}</a><br>";
	echo "{$e["summary"]}";
	
	echo "<tr><td>&nbsp;";
	
	}
echo "</table>";

?>